package org.dandsoft.blackbox;

/**
 * User: dvilyuzhanin
 * Date: 23.01.2009 0:39:47
 */
public class IntegerObjectId extends ObjectId{
    private static final long serialVersionUID = -6023614096562720587L;
    private int value;

    public IntegerObjectId(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        IntegerObjectId that = (IntegerObjectId) o;

        if (value != that.value) return false;

        return true;
    }

    public int hashCode() {
        return value;
    }


    public String toString() {
        return "IntegerObjectId{" +
               "value=" + value +
               '}';
    }
}
